package com.happy.cat.project.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.happy.cat.framework.aspectj.lang.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;


/**
 * 用户登录日志对象 user_login_log
 * 
 * @author verne
 * @date 2020-08-04
 */
@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@Accessors(chain = true)
@TableName(autoResultMap = true )
@ApiModel(value="用户登录日志对象", description="用户登录日志对象数据")
public class UserLoginLog implements Serializable {

private static final long serialVersionUID=1L;


    /** id */
    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 账号id */
    @Excel(name = "账号id")
    @ApiModelProperty(value = "账号id")
    private Long accountId;

    /** 登录时间 */
    @ApiModelProperty(value = "登录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 用户登录token */
    @Excel(name = "用户登录token")
    @ApiModelProperty(value = "用户登录token")
    private String token;

    /** 登录设备及设备号 */
    @Excel(name = "登录设备及设备号")
    @ApiModelProperty(value = "登录设备及设备号")
    private String device;

    /** 登录类型 */
    @Excel(name = "登录类型")
    @ApiModelProperty(value = "登录类型")
    private Long loginType;

    /** 登录结果 */
    @Excel(name = "登录结果")
    @ApiModelProperty(value = "登录结果")
    private String loginResult;

    /** 登录失败原因 */
    @Excel(name = "登录失败原因")
    @ApiModelProperty(value = "登录失败原因")
    private String resultReason;

    /** 离线时间 */
    @ApiModelProperty(value = "离线时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date offlineTime;

    @ApiModelProperty(value = "IP地址")
    private String ip;

    @ApiModelProperty(value = "登录地区")
    private String address;
}
